<!--
	作者：totoro
	时间：2015-09-02
	描述：人才库
-->
<!--
     合作弹出框
-->
<div class="md-modal md-effect-2" id="modal-2">
	<div class="md-content">
		<div class="modal-header">
			<button class="md-close close" >&times;</button>
			<h4 class="modal-title">申请合作</h4>
		</div>
		<div class="modal-body">
			<form role="form">
			
				<div class="form-group">
					<input  class="form-control"  type="hidden" value="" autofocus="autofocus" ng-model="add.personCompanyName" >
					<input  class="form-control"  type="hidden" value="" autofocus="autofocus" ng-model="add.personName">
				    <input  class="form-control"  type="hidden" value="" autofocus="autofocus" ng-model="add.personCompanyCode">	
					<input  class="form-control"   type="hidden"   ng-init="add.newCompanyName"   autofocus="autofocus">
						<input  class="form-control"   type="hidden"   ng-init="add.newCompanycode"   autofocus="autofocus">
					<label  >订单id</label>
					<input  class="form-control"  type="text" value="" id="orderId" name="orderId" autofocus="autofocus" ng-model="add.orderId" >				
					<label  >申请公司比例(%)</label>
					<input  class="form-control"  type="text" value="" autofocus="autofocus" ng-model="add.Proportion"  ng-click="orderIdCheck(add.orderId,add.personServiceType3Code)"  oninput="if (! /^([0-9]\d?|100)$/ig.test(this.value)){this.value='';};if(this.value.length>1&&this.value.substr(0,1)==0){alert('第一位不能为0!');this.value=''}"  >				
					<label  >被申请公司比例(%)</label>
					<input  class="form-control"  type="text" value="" autofocus="autofocus" ng-model="add.Proportion2" oninput="if (! /^([0-9]\d?|100)$/ig.test(this.value)){this.value='';};if(this.value.length>1&&this.value.substr(0,1)==0){alert('第一位不能为0!');this.value=''}">
				</div>
				
				
			</form>
		</div>
		<div class="modal-footer">
			<button type="button" class="btn btn-primary"   ng-click="save(add)">提交</button>
			
		</div>
	</div>
</div>
<!-- table  -->
<div class="row">
	<div class="col-lg-12">
		<ol class="breadcrumb">
			<li><a><i class="fa fa-home mrg-r-sm"></i>首页</a>
			</li>
			<li class="active"><span>人才库</span>
			</li>
		</ol>
		<div class="clearfix">
			<div class="filter-block pull-left">
				<!--搜索框 Start1-->
				<div class="form-group pull-left">
					<input type="text" class="form-control" ng-model="search.username"  placeholder="请输入姓名">
				</div>
				<div class="form-group pull-left">
					<input type="text" class="form-control" ng-model="search.nativePlace"  placeholder="请输入籍贯">
				</div>
				<div class="form-group pull-left">
					<input type="text" class="form-control" ng-model="search.address"  placeholder="请输入住址">
				</div>
				<div class="form-group pull-left">
					<input type="text" class="form-control"  id="birthday"   onclick="laydate({istime: true, format: 'YYYY-MM-DD'})" ng-model="search.birthday"  placeholder="出生日期">
				</div>
				<div class="form-group pull-left">
				    <select class="form-control"  ng-model="search.service1" ng-click="getserviceType2(search.service1.code)" ng-options=" service1 as service1.title for service1 in serviceList" >
						<option value="">请选择服务项目</option>
					</select>
				</div>
				<div class="form-group pull-left">
					<select class="form-control"  ng-model="search.service2" ng-click="getserviceType3(search.service2.code)"  ng-options=" service2 as service2.title for service2 in serviceList2" >
						<option value="">请选择服务项目</option>
					</select>
				</div>
				<div class="form-group pull-left">
					<select class="form-control"  ng-model="search.service3"   ng-options=" service3 as service3.title for service3 in serviceList3" >
						<option value="">请选择服务项目</option>
					</select>
				</div>
				<div class="form-group pull-left">
					<select class="form-control" ng-model="search.cers" ng-options="c.name as c.name for c in cerslist" >
						<option value="">请选择证书</option>
					</select>
				</div>
				
				<div class="form-group pull-left">
					<select class="form-control" ng-model="search.technique" ng-options="t.name as t.name for t in techniquelist" >
						<option value="">请选择技能</option>
					</select>
				</div>
				<div class="form-group pull-left">
					<select class="form-control" ng-model="search.servantstatus" >
						<option value="">请选择工作状态</option>
						<option value="待岗">待岗</option>
						<option value="在岗">在岗</option>
						<option value="离职">离职</option>
						<option value="休假">休假</option>
					</select>
				</div>
				<!--搜索框 End1-->
				<a class="btn btn-success pull-left form-group" ng-click="search(search)"  >
				 搜索
				 </a>

			</div>
		</div>
	</div>
</div>
<div class="row">
	<div class="col-lg-12">
		<div class="main-box no-header clearfix">
			<div class="main-box-body clearfix">
				<div class="table-responsive">
					<table class="table user-list table-hover">
						<thead>
							<tr>
								<th style="width:200px;">
									<span>人员</span>
								</th>
								
								<th class="text-center">
									<span>出生日期</span>
								</th>
								<th class="text-center">
									<span>籍贯</span>
								</th>
								<th class="text-center">
									<span>现住址</span>
								</th>
								<th class="text-center" style="width:150px;">
									<span>服务项目</span>
								</th>
								<th class="text-center"><span>归属企业</span>
								</th>
								<th class="text-center" style="width:70px;"><span>工作状态</span>
								</th>
								<th class="text-center">操作</th>
							</tr>
						</thead>
						<tbody>
							 <tr ng-repeat="item in list" on-finish-render-filters >
					            <td  >
					            	<img src="{{URL+item.photo}}" alt=""  class="user_logo" ng-show="item.photo!=''&&item.photo!=null" />
					            	<img src="../../public/img/noimg.jpeg" class="user_logo" alt=""  ng-if="item.photo==''||item.photo==null" />
									<a class="user-link">{{item.name}}</a>
									<span class="user-subhead">{{item.sex}}</span>
					            </td>
					            <td class="text-center">{{item.birthday}}</td>
					            <td class="text-center">{{item.nativePlace}}</td>
					            <td class="text-center">{{item.address}}</td>
					            <td class="text-center">
									<span ng-repeat="job in item.serviceType3_title track by $index">
										{{job}}
									</span>
					            </td>
					            <td class="text-center">{{item.company_name}}</td>
					            <td class="text-center">
					            	<span ng-if="item.servantstatus=='待岗'" class="label label-default">{{item.servantstatus}}</span>
					            	<span ng-if="item.servantstatus=='离职'" class="label label-warning">{{item.servantstatus}}</span>
					            	<span ng-if="item.servantstatus=='休假'" class="label label-warning">{{item.servantstatus}}</span>
					            	<span ng-if="item.servantstatus=='在岗'" class="label label-success">{{item.servantstatus}}</span>
					            </td>
					            <td class="text-center">
								    <a class="md-trigger table-link " data-modal="modal-2"  title="申请合作"  ng-click="getCompanyPersonInfo(item.name,item.company_name,item.company_code,item.servant_id,item.serviceType3_code)">
										<span class="fa-stack">
										<i class="fa fa-square fa-stack-2x"></i>
										<i class="fa fa-adjust fa-stack-1x fa-inverse"></i>								
										</span>
									</a>
                                    <a href="#/servant/talentPoolNewDetails/{{item.servant_id}}" class="table-link">
                                        <span class="fa-stack">
                                            <i class="fa fa-square fa-stack-2x"></i>
                                            <i class="fa fa-info fa-stack-1x fa-inverse"></i>
                                        </span>
                                    </a>	
					            </td>
        					</tr>
						</tbody>
					</table>
				</div>
				<ul class="pagination pull-right">
					<li><a >总条数：{{count}}</a></li>
					<li><a >总页数：{{totalPage}}</a></li>
			        <li><a ng-click="changePage(1)">首页</a></li>
			        <li><a ng-show="currentPage>1" ng-click="changePage(currentPage-1)"><i class="fa fa-chevron-left"></i></a></li>
			        <li ng-repeat="item in pageList" ng-click="changePage(item.number)" class="{{item.active}}"><a>{{item.number}}</a></li>
			        <li><a ng-show="currentPage<totalPage" ng-click="changePage(currentPage+1)"><i class="fa fa-chevron-right"></i></a></li>
			        <li><a ng-click="changePage(totalPage)">尾页</a></li>
				</ul>
			</div>
		</div>
	</div>
</div>
<div class="md-overlay"></div>

<script src="../default/js/modernizr.custom.js"></script>
<script src="../default/js/classie.js"></script>
<script src="../default/js/modalEffects.js"></script>
<script type="text/javascript">
function init() {
	var overlay = document.querySelector('.md-overlay');
	[].slice.call(document.querySelectorAll('.md-trigger')).forEach(function(el, i) {
		var modal = document.querySelector('#' + el.getAttribute('data-modal')),
			close = modal.querySelector('.md-close');
		function removeModal(hasPerspective) {
			classie.remove(modal, 'md-show');
			if (hasPerspective) {
				classie.remove(document.documentElement, 'md-perspective');
			}
		}

		function removeModalHandler() {
			removeModal(classie.has(el, 'md-setperspective'));
		}
		el.addEventListener('click', function(ev) {
			classie.add(modal, 'md-show');
			overlay.removeEventListener('click', removeModalHandler);
			overlay.addEventListener('click', removeModalHandler);
			if (classie.has(el, 'md-setperspective')) {
				setTimeout(function() {
					classie.add(document.documentElement, 'md-perspective');
				}, 25);
			}
		});
		close.addEventListener('click', function(ev) {
			ev.stopPropagation();
			removeModalHandler();
		});
		$(document).keyup(function(e) {
			if (e.keyCode == 27) {
				e.stopPropagation();
				removeModalHandler();
			}
		});
	});
}
function closeMod(){
	$(".md-close").click();
}

</script>
